<?php
    require ('/connect.php');
    $sid = $_POST['sid'];
    $query1="DELETE FROM friends WHERE (Friend1=$id && Friend2=$sid) || (Friend1=$sid && Friend2=$id)";
    mysqli_prepare($con,$query1);
    $mysqli_execute = mysqli_execute($query1);
    
    
    // Set autocommit to off
    mysqli_autocommit($con,FALSE);
    
    // Insert some values 
    mysqli_query($con,$query1);
    
    // Commit transaction
    mysqli_commit($con);

    // Close connection
    mysqli_close($con);
?>
